<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  bottom.active{
    background-color: #abcdef;
  }
  .content img{
    width: 30%;
    height: 30%;
    margin-top: 10px;
  }
</style>
<body>
  <div id="app">
    <button @click='tab(0)' :class='{active: num===0}'>1</button>
    <button @click='tab(1)' :class='{active: num===1}'>2</button>
    <button @click='tab(2)' :class='{active: num===2}'>3</button>
    <button @click='tab(3)' :class='{active: num===3}'>4</button>
    <div v-show='num===0' class="content">
      <img src="https://img.tupianzj.com/uploads/allimg/202012/9999/950b992764.jpg" alt="">
    </div>
    <div v-show='num===1' class="content">
      <img src="https://img.tupianzj.com/uploads/allimg/202102/9999/8b45bc942e.jpg" alt="">
    </div>
    <div v-show='num===2' class="content">
      <img src="https://img.tupianzj.com/uploads/allimg/202103/9999/914fab1997.jpg" alt="">
    </div>
    <div v-show='num===3' class="content">
      <img src="https://img.tupianzj.com/uploads/allimg/202004/9999/bae7f62401.jpg" alt="">
    </div>
  </div>
</body>
<script src="./vue.js"></script>
<script>
  const vm = new Vue({
    el: '#app',
    data: {
      num: 0
    },
    methods: {
      tab(n){
        this.num = n;
      }
    }
  })
</script>
</html>